﻿@using Vnsf.WebHost.Infrastructure.Alerts
@if (TempData.GetAlerts().Any())
{
    <script type="text/javascript">
        $(function () {
            @foreach (var alert in TempData.GetAlerts())
            {
                <text>
                window.alerts.showAlert({
                    message: '@alert.Message.Replace("'","\\'")',
                    alertClass: '@alert.AlertClass'
                });
                </text>
            }
        });
    </script>
    @*<div class="container alert-container alert">
            @foreach (var alert in TempData.GetAlerts())
            {
                <div class="alert @alert.AlertClass alert-dissmisable">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                    @alert.Message
                </div>
            }
        </div>*@
}